/*
* Copyright 2025 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_screen(lv_ui *ui)
{
	//Write codes screen
	ui->screen = lv_obj_create(NULL);
	lv_obj_set_size(ui->screen, 480, 320);
	lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen, LV_GRAD_DIR_HOR, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_color(ui->screen, lv_color_hex(0x331501), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_main_stop(ui->screen, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_stop(ui->screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_meter_1
	ui->screen_meter_1 = lv_meter_create(ui->screen);
	// add scale ui->screen_meter_1_scale_0
	ui->screen_meter_1_scale_0 = lv_meter_add_scale(ui->screen_meter_1);
	lv_meter_set_scale_ticks(ui->screen_meter_1, ui->screen_meter_1_scale_0, 41, 1, 5, lv_color_hex(0x2F35DA));
	lv_meter_set_scale_major_ticks(ui->screen_meter_1, ui->screen_meter_1_scale_0, 10, 2, 8, lv_color_hex(0x00ff24), 10);
	lv_meter_set_scale_range(ui->screen_meter_1, ui->screen_meter_1_scale_0, 0, 400, 310, 90);

	// add scale line for ui->screen_meter_1_scale_0
	ui->screen_meter_1_scale_0_scaleline_0 = lv_meter_add_scale_lines(ui->screen_meter_1, ui->screen_meter_1_scale_0, lv_color_hex(0xffff00), lv_color_hex(0x1b00ff), true, 0);
	lv_meter_set_indicator_start_value(ui->screen_meter_1, ui->screen_meter_1_scale_0_scaleline_0, 0);
	lv_meter_set_indicator_end_value(ui->screen_meter_1, ui->screen_meter_1_scale_0_scaleline_0, 400);

	// add needle line for ui->screen_meter_1_scale_0.
	ui->screen_meter_1_scale_0_ndline_0 = lv_meter_add_needle_line(ui->screen_meter_1, ui->screen_meter_1_scale_0, 2, lv_color_hex(0x000000), -2);
	lv_meter_set_indicator_value(ui->screen_meter_1, ui->screen_meter_1_scale_0_ndline_0, 0);
	lv_obj_set_pos(ui->screen_meter_1, 80, 80);
	lv_obj_set_size(ui->screen_meter_1, 120, 120);

	//Write style for screen_meter_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_1, 131, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_meter_1, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_meter_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_meter_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style for screen_meter_1, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
	lv_obj_set_style_text_color(ui->screen_meter_1, lv_color_hex(0xff0000), LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_meter_1, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_meter_1, 255, LV_PART_TICKS|LV_STATE_DEFAULT);

	//Write style for screen_meter_1, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_1, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_1, lv_color_hex(0x000000), LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_1, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);

	//Write codes screen_meter_2
	ui->screen_meter_2 = lv_meter_create(ui->screen);
	// add scale ui->screen_meter_2_scale_0
	ui->screen_meter_2_scale_0 = lv_meter_add_scale(ui->screen_meter_2);
	lv_meter_set_scale_ticks(ui->screen_meter_2, ui->screen_meter_2_scale_0, 41, 1, 5, lv_color_hex(0x2F35DA));
	lv_meter_set_scale_major_ticks(ui->screen_meter_2, ui->screen_meter_2_scale_0, 10, 2, 8, lv_color_hex(0x00ff24), 10);
	lv_meter_set_scale_range(ui->screen_meter_2, ui->screen_meter_2_scale_0, 0, 10000, 310, 90);

	// add scale line for ui->screen_meter_2_scale_0
	ui->screen_meter_2_scale_0_scaleline_0 = lv_meter_add_scale_lines(ui->screen_meter_2, ui->screen_meter_2_scale_0, lv_color_hex(0xffff00), lv_color_hex(0x1b00ff), true, 0);
	lv_meter_set_indicator_start_value(ui->screen_meter_2, ui->screen_meter_2_scale_0_scaleline_0, 0);
	lv_meter_set_indicator_end_value(ui->screen_meter_2, ui->screen_meter_2_scale_0_scaleline_0, 400);

	// add needle line for ui->screen_meter_2_scale_0.
	ui->screen_meter_2_scale_0_ndline_0 = lv_meter_add_needle_line(ui->screen_meter_2, ui->screen_meter_2_scale_0, 2, lv_color_hex(0x000000), -2);
	lv_meter_set_indicator_value(ui->screen_meter_2, ui->screen_meter_2_scale_0_ndline_0, 0);
	lv_obj_set_pos(ui->screen_meter_2, 280, 80);
	lv_obj_set_size(ui->screen_meter_2, 120, 120);

	//Write style for screen_meter_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_2, 131, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_meter_2, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_meter_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_meter_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style for screen_meter_2, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
	lv_obj_set_style_text_color(ui->screen_meter_2, lv_color_hex(0xff0000), LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_meter_2, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_meter_2, 255, LV_PART_TICKS|LV_STATE_DEFAULT);

	//Write style for screen_meter_2, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_2, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_2, lv_color_hex(0x000000), LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_2, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);

	//Write codes screen_meter_3
	ui->screen_meter_3 = lv_meter_create(ui->screen);
	// add scale ui->screen_meter_3_scale_0
	ui->screen_meter_3_scale_0 = lv_meter_add_scale(ui->screen_meter_3);
	lv_meter_set_scale_ticks(ui->screen_meter_3, ui->screen_meter_3_scale_0, 41, 1, 5, lv_color_hex(0xff6500));

	// add scale line for ui->screen_meter_3_scale_0
	ui->screen_meter_3_scale_0_scaleline_0 = lv_meter_add_scale_lines(ui->screen_meter_3, ui->screen_meter_3_scale_0, lv_color_hex(0xffff00), lv_color_hex(0xff00ff), true, 0);
	lv_meter_set_indicator_start_value(ui->screen_meter_3, ui->screen_meter_3_scale_0_scaleline_0, 0);
	lv_meter_set_indicator_end_value(ui->screen_meter_3, ui->screen_meter_3_scale_0_scaleline_0, 20);

	// add needle line for ui->screen_meter_3_scale_0.
	ui->screen_meter_3_scale_0_ndline_0 = lv_meter_add_needle_line(ui->screen_meter_3, ui->screen_meter_3_scale_0, 2, lv_color_hex(0x000000), -2);
	lv_meter_set_indicator_value(ui->screen_meter_3, ui->screen_meter_3_scale_0_ndline_0, 0);
	lv_obj_set_pos(ui->screen_meter_3, 170, 180);
	lv_obj_set_size(ui->screen_meter_3, 60, 60);

	//Write style for screen_meter_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_3, 131, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_3, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_3, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_meter_3, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_meter_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_meter_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style for screen_meter_3, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
	lv_obj_set_style_text_color(ui->screen_meter_3, lv_color_hex(0xff0000), LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_meter_3, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_meter_3, 255, LV_PART_TICKS|LV_STATE_DEFAULT);

	//Write style for screen_meter_3, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_3, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_3, lv_color_hex(0x000000), LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_3, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);

	//Write codes screen_meter_4
	ui->screen_meter_4 = lv_meter_create(ui->screen);
	// add scale ui->screen_meter_4_scale_0
	ui->screen_meter_4_scale_0 = lv_meter_add_scale(ui->screen_meter_4);
	lv_meter_set_scale_ticks(ui->screen_meter_4, ui->screen_meter_4_scale_0, 41, 1, 5, lv_color_hex(0xff0027));

	// add scale line for ui->screen_meter_4_scale_0
	ui->screen_meter_4_scale_0_scaleline_0 = lv_meter_add_scale_lines(ui->screen_meter_4, ui->screen_meter_4_scale_0, lv_color_hex(0xffff00), lv_color_hex(0xff00ff), true, 0);
	lv_meter_set_indicator_start_value(ui->screen_meter_4, ui->screen_meter_4_scale_0_scaleline_0, 0);
	lv_meter_set_indicator_end_value(ui->screen_meter_4, ui->screen_meter_4_scale_0_scaleline_0, 20);

	// add needle line for ui->screen_meter_4_scale_0.
	ui->screen_meter_4_scale_0_ndline_0 = lv_meter_add_needle_line(ui->screen_meter_4, ui->screen_meter_4_scale_0, 2, lv_color_hex(0x000000), -2);
	lv_meter_set_indicator_value(ui->screen_meter_4, ui->screen_meter_4_scale_0_ndline_0, 0);
	lv_obj_set_pos(ui->screen_meter_4, 250, 180);
	lv_obj_set_size(ui->screen_meter_4, 60, 60);

	//Write style for screen_meter_4, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_meter_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_meter_4, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_meter_4, 131, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_4, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_4, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_meter_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style for screen_meter_4, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
	lv_obj_set_style_text_color(ui->screen_meter_4, lv_color_hex(0xff0000), LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_meter_4, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_meter_4, 255, LV_PART_TICKS|LV_STATE_DEFAULT);

	//Write style for screen_meter_4, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_meter_4, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_meter_4, lv_color_hex(0x000000), LV_PART_INDICATOR|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_meter_4, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);

	//Write codes screen_time
	ui->screen_time = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_time, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_time, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_time, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_time_span = lv_spangroup_new_span(ui->screen_time);
	lv_span_set_text(ui->screen_time_span, "Time:23:59:55");
	lv_style_set_text_color(&ui->screen_time_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_time_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_time_span->style, &lv_font_ArchitectsDaughter_12);
	lv_obj_set_pos(ui->screen_time, 10, 10);
	lv_obj_set_size(ui->screen_time, 200, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_time_main_main_default
	static lv_style_t style_screen_time_main_main_default;
	ui_init_style(&style_screen_time_main_main_default);
	
	lv_style_set_border_width(&style_screen_time_main_main_default, 0);
	lv_style_set_radius(&style_screen_time_main_main_default, 0);
	lv_style_set_bg_opa(&style_screen_time_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_time_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_time_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_time_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_time_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_time_main_main_default, 0);
	lv_obj_add_style(ui->screen_time, &style_screen_time_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_time);

	//Write codes screen_spangroup_1
	ui->screen_spangroup_1 = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_spangroup_1, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_spangroup_1, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_spangroup_1, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_spangroup_1_span = lv_spangroup_new_span(ui->screen_spangroup_1);
	lv_span_set_text(ui->screen_spangroup_1_span, "Lon:116.3913447°      Lat:39.9053937°     Alt:200m");
	lv_style_set_text_color(&ui->screen_spangroup_1_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_spangroup_1_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_spangroup_1_span->style, &lv_font_montserratMedium_12);
	lv_obj_set_pos(ui->screen_spangroup_1, 10, 300);
	lv_obj_set_size(ui->screen_spangroup_1, 420, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_1_main_main_default
	static lv_style_t style_screen_spangroup_1_main_main_default;
	ui_init_style(&style_screen_spangroup_1_main_main_default);
	
	lv_style_set_bg_opa(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_radius(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_border_width(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_spangroup_1_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_spangroup_1_main_main_default, 0);
	lv_obj_add_style(ui->screen_spangroup_1, &style_screen_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_spangroup_1);

	//Write codes screen_Speed
	ui->screen_Speed = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_Speed, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_Speed, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_Speed, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_Speed_span = lv_spangroup_new_span(ui->screen_Speed);
	lv_span_set_text(ui->screen_Speed_span, "234Km/h");
	lv_style_set_text_color(&ui->screen_Speed_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_Speed_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_Speed_span->style, &lv_font_montserratMedium_12);
	lv_obj_set_pos(ui->screen_Speed, 106, 207);
	lv_obj_set_size(ui->screen_Speed, 80, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_Speed_main_main_default
	static lv_style_t style_screen_Speed_main_main_default;
	ui_init_style(&style_screen_Speed_main_main_default);
	
	lv_style_set_border_width(&style_screen_Speed_main_main_default, 0);
	lv_style_set_radius(&style_screen_Speed_main_main_default, 0);
	lv_style_set_bg_opa(&style_screen_Speed_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_Speed_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_Speed_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_Speed_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_Speed_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_Speed_main_main_default, 0);
	lv_obj_add_style(ui->screen_Speed, &style_screen_Speed_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_Speed);

	//Write codes screen_rotation
	ui->screen_rotation = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_rotation, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_rotation, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_rotation, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_rotation_span = lv_spangroup_new_span(ui->screen_rotation);
	lv_span_set_text(ui->screen_rotation_span, "1234/r");
	lv_style_set_text_color(&ui->screen_rotation_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_rotation_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_rotation_span->style, &lv_font_montserratMedium_12);
	lv_obj_set_pos(ui->screen_rotation, 329, 207);
	lv_obj_set_size(ui->screen_rotation, 80, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_rotation_main_main_default
	static lv_style_t style_screen_rotation_main_main_default;
	ui_init_style(&style_screen_rotation_main_main_default);
	
	lv_style_set_border_width(&style_screen_rotation_main_main_default, 0);
	lv_style_set_radius(&style_screen_rotation_main_main_default, 0);
	lv_style_set_bg_opa(&style_screen_rotation_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_rotation_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_rotation_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_rotation_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_rotation_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_rotation_main_main_default, 0);
	lv_obj_add_style(ui->screen_rotation, &style_screen_rotation_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_rotation);

	//Write codes screen_oil
	ui->screen_oil = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_oil, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_oil, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_oil, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_oil_span = lv_spangroup_new_span(ui->screen_oil);
	lv_span_set_text(ui->screen_oil_span, "10%");
	lv_style_set_text_color(&ui->screen_oil_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_oil_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_oil_span->style, &lv_font_montserratMedium_12);
	lv_obj_set_pos(ui->screen_oil, 186, 250);
	lv_obj_set_size(ui->screen_oil, 80, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_oil_main_main_default
	static lv_style_t style_screen_oil_main_main_default;
	ui_init_style(&style_screen_oil_main_main_default);
	
	lv_style_set_border_width(&style_screen_oil_main_main_default, 0);
	lv_style_set_radius(&style_screen_oil_main_main_default, 0);
	lv_style_set_bg_opa(&style_screen_oil_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_oil_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_oil_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_oil_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_oil_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_oil_main_main_default, 0);
	lv_obj_add_style(ui->screen_oil, &style_screen_oil_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_oil);

	//Write codes screen_temp
	ui->screen_temp = lv_spangroup_create(ui->screen);
	lv_spangroup_set_align(ui->screen_temp, LV_TEXT_ALIGN_LEFT);
	lv_spangroup_set_overflow(ui->screen_temp, LV_SPAN_OVERFLOW_CLIP);
	lv_spangroup_set_mode(ui->screen_temp, LV_SPAN_MODE_BREAK);
	//create span 
	ui->screen_temp_span = lv_spangroup_new_span(ui->screen_temp);
	lv_span_set_text(ui->screen_temp_span, "10C");
	lv_style_set_text_color(&ui->screen_temp_span->style, lv_color_hex(0xffffff));
	lv_style_set_text_decor(&ui->screen_temp_span->style, LV_TEXT_DECOR_NONE);
	lv_style_set_text_font(&ui->screen_temp_span->style, &lv_font_montserratMedium_12);
	lv_obj_set_pos(ui->screen_temp, 264, 250);
	lv_obj_set_size(ui->screen_temp, 80, 15);

	//Write style state: LV_STATE_DEFAULT for &style_screen_temp_main_main_default
	static lv_style_t style_screen_temp_main_main_default;
	ui_init_style(&style_screen_temp_main_main_default);
	
	lv_style_set_border_width(&style_screen_temp_main_main_default, 0);
	lv_style_set_radius(&style_screen_temp_main_main_default, 0);
	lv_style_set_bg_opa(&style_screen_temp_main_main_default, 0);
	lv_style_set_pad_top(&style_screen_temp_main_main_default, 0);
	lv_style_set_pad_right(&style_screen_temp_main_main_default, 0);
	lv_style_set_pad_bottom(&style_screen_temp_main_main_default, 0);
	lv_style_set_pad_left(&style_screen_temp_main_main_default, 0);
	lv_style_set_shadow_width(&style_screen_temp_main_main_default, 0);
	lv_obj_add_style(ui->screen_temp, &style_screen_temp_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_spangroup_refr_mode(ui->screen_temp);

	//The custom code of screen.
	

	//Update current screen layout.
	lv_obj_update_layout(ui->screen);

}
